/**
 * 
 */
package com.gragra.util;
import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
/**
 * @author Christoph Teichmann
 * 31.07.2013
 */
public class IntPairSet
{
	/**
	 * 
	 */
	private final LongOpenHashSet set = new LongOpenHashSet();
	/**
	 * 
	 * @see it.unimi.dsi.fastutil.longs.LongOpenHashSet#clear()
	 */
	public void clear()
	{this.set.clear();}
	/**
	 * @param o
	 * @return
	 * @see it.unimi.dsi.fastutil.longs.AbstractLongSet#equals(java.lang.Object)
	 */
	public boolean equals(Object o)
	{
		if(o instanceof IntPairSet)
		{return this.set.equals(((IntPairSet) o).set);}
		else
		{return false;}
	}
	/**
	 * @return
	 * @see it.unimi.dsi.fastutil.longs.LongOpenHashSet#isEmpty()
	 */
	public boolean isEmpty()
	{return this.set.isEmpty();}
	/**
	 * 
	 * @param first
	 * @param second
	 * @return
	 */
	public boolean add(int first, int second)
	{return this.set.add(BooleanInterweave.combine(first, second));}
	/**
	 * 
	 * @param first
	 * @param second
	 * @return
	 */
	public boolean contains(int first,int second)
	{return this.set.contains(BooleanInterweave.combine(first, second));}
}